﻿namespace Web.Client.Model
{
    /// <summary>
    /// 产品model
    /// </summary>
    public struct ProjectModel
    {
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <param name="description"></param>
        /// <param name="introductions"></param>
        public ProjectModel(int id, string name, string description, string[] introductions)
        {
            this.Id = id;
            this.Name = name;
            this.Description = description;
            this.Introductions = introductions;
        }
        /// <summary>
        /// Id
        /// </summary>
        public int Id;
        /// <summary>
        /// 名称
        /// </summary>
        public string Name;
        /// <summary>
        /// 描述
        /// </summary>
        public string Description;
        /// <summary>
        /// 介绍
        /// </summary>
        public string[] Introductions;
    }
    /// <summary>
    /// 产品及明细
    /// </summary>
    public struct ProjectDetailModel
    {
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <param name="details"></param>
        public ProjectDetailModel(int id, string name, DetailModel[] details)
        {
            this.Id = id;
            this.Name = name;
            this.Details = details;
        }
        /// <summary>
        /// id
        /// </summary>
        public int Id;
        /// <summary>
        /// 产品名称
        /// </summary>
        public string Name;
        /// <summary>
        /// 明细集合
        /// </summary>
        public DetailModel[] Details;
    }
    /// <summary>
    /// 明细
    /// </summary>
    public struct DetailModel
    {
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="id"></param>
        /// <param name="month"></param>
        /// <param name="price"></param>
        /// <param name="discount"></param>
        public DetailModel(int id, short month, decimal price, decimal discount)
        {
            this.Id = id;
            this.Month = month;
            this.Price = price;
            this.Discount = discount;
        }
        /// <summary>
        /// 明细Id
        /// </summary>
        public int Id;
        /// <summary>
        /// 期限
        /// </summary>
        public short Month;
        /// <summary>
        /// 价格
        /// </summary>
        public decimal Price;
        /// <summary>
        /// 折扣
        /// </summary>
        public decimal Discount;
    }
}
